feat(automation): continual learning, agents-md-audit, shell entry points#474
Conversation
…entry points Wire continual-learning skill and agents-memory-updater subagent, add a read-only AGENTS.md audit agent, shell/Makefile shortcuts, and docs for the expanded repository inspection automation stack. Co-authored-by: Bryan
|
@Bryan-Roe Thanks for sending me some feedback. Unfortunately, I hit an error while trying to use the custom Copilot setup steps configured for this repository. The error I am seeing is: Once you or someone with the necessary access fixes the problem, please let me know in a comment and I'll try again. Thanks! |
Reviewer's GuideImplements a new AGENTS.md audit automation agent, wires it into the existing repo automation workflow (including Make/ shell entrypoints), and introduces a Cursor-based continual-learning workflow that keeps AGENTS.md Learned sections in sync with mined transcripts. Sequence diagram for continual-learning skill and agents-memory-updater workflowsequenceDiagram
actor Developer
participant CursorChat as CursorChat
participant ContinualLearning as continual-learning
participant MemoryUpdater as agents-memory-updater
participant AgentsMd as AGENTS.md
participant Index as continual-learning-index.json
Developer->>CursorChat: invoke /continual-learning
CursorChat->>ContinualLearning: trigger SKILL.md workflow
ContinualLearning->>MemoryUpdater: call agents-memory-updater
MemoryUpdater->>AgentsMd: read AGENTS.md
MemoryUpdater->>Index: read .cursor/hooks/state/continual-learning-index.json
MemoryUpdater->>MemoryUpdater: mine transcript deltas
MemoryUpdater->>AgentsMd: update Learned sections (<=12 bullets)
MemoryUpdater->>Index: write updated incremental index
MemoryUpdater-->>ContinualLearning: updater result
ContinualLearning-->>CursorChat: return result
CursorChat-->>Developer: show updated memory status or "No high-signal memory updates."
Flow diagram for repo automation entrypoints and agents-md-audit agentflowchart LR
Dev[Developer] -->|make agents / make agents-dry| Make
Dev -->|./scripts/run_ai_automation.sh| Shell
Dev -->|python scripts/run_repo_agents.py| Runner
Make --> Runner
Shell --> Runner
Runner[scripts/run_repo_agents.py]
subgraph Agents
A1[status-freshness]
A2[marker-audit]
A3[docstring-audit]
A4[agents-md-audit]
end
Runner --> A1
Runner --> A2
Runner --> A3
Runner --> A4
A4 --> AGENTS[AGENTS.md Learned sections]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🟡 Coverage —
|
| Metric | Value |
|---|---|
| Total coverage | 65.2% |
▲ vs main |
+0.1% |
| Minimum threshold | 60% |
Updated on every push · 2026-06-21
There was a problem hiding this comment.
Pull request overview
This PR extends the repository's deterministic automation-agent framework (scripts/agents/) with a new read-only agents-md-audit agent that validates the structure and hygiene of AGENTS.md Learned sections (required sections, bullet limits, merge-conflict markers, secret patterns, and stale dates). It also adds developer entry points (make agents/agents-dry/ai-automation, plus a scripts/run_ai_automation.sh wrapper), wires the agent into the shared run_repo_agents.py orchestration, introduces a Cursor-native continual-learning skill + subagent for keeping AGENTS.md in sync, and corrects documentation (notably the --run-agents ordering, which the code runs after the integration contract gate).
Changes:
- New
agents-md-auditautomation agent + dedicated test suite, registered inrun_repo_agents.py. - New shell/Makefile entry points to run inspection agents from a single command.
- Continual-learning Cursor skill +
agents-memory-updatersubagent, with synced docs (AGENTS.md, scripts/README.md, REPO_AUTOMATION_GUIDE.md).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/agents/agents_md_audit_agent.py |
New audit agent; follows the existing AutomationAgent/CLI conventions for parsing, findings, status, and write_status. |
tests/test_agents_md_audit_agent.py |
New tests covering valid/missing/over-limit/secret/stale/CLI paths; fixture embeds a wall-clock-relative date that will eventually flip the "valid" case to a warning. |
scripts/run_repo_agents.py |
Registers the new agent module so it participates in standard runs. |
scripts/run_ai_automation.sh |
New wrapper that hardcodes .venv/bin/python without the venv-fallback used by sibling scripts. |
Makefile |
Adds agents, agents-dry, ai-automation targets and .PHONY entries (help preserved). |
scripts/README.md |
Documents the new agent, entry points, and corrected --run-agents ordering. |
docs/guides/REPO_AUTOMATION_GUIDE.md |
Documents the new agent and corrected (after-gate) --run-agents ordering, verified against code. |
AGENTS.md |
Adds repo-agent and continual-learning usage notes to test/entry-point sections. |
.cursor/skills/continual-learning/SKILL.md |
Orchestration-only skill delegating to the updater subagent. |
.cursor/agents/agents-memory-updater.md |
Subagent definition for transcript-mining and AGENTS.md memory updates. |
|
|
||
| ## Learned Workspace Facts | ||
|
|
||
| - Unit test suite passes 2700 tests (as of 2026-06-20). |
| REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" | ||
| exec "${REPO_ROOT}/.venv/bin/python" "${REPO_ROOT}/scripts/run_repo_agents.py" "$@" |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_6abfa7a0-2ede-4e0a-bdbe-6879a754ee3b) |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
test_valid_agents_md_passesfixture hardcodes a2026-06-20date and uses the defaultstale_date_days=30, so as time passes this will start failing due to the stale-date check; consider deriving the date dynamically (e.g., usingdatetime.now()minus a small offset) or overridingstale_date_daysto a very large value in that test to keep it stable over time.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `test_valid_agents_md_passes` fixture hardcodes a `2026-06-20` date and uses the default `stale_date_days=30`, so as time passes this will start failing due to the stale-date check; consider deriving the date dynamically (e.g., using `datetime.now()` minus a small offset) or overriding `stale_date_days` to a very large value in that test to keep it stable over time.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
🔐 CodeQL — Open Alerts on this PR
Copilot Autofix suggestions (if enabled) appear as inline review comments on the affected lines. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e3ecee1a-e640-4045-b89d-428a061e630b) |
Summary
Adds the continual-learning Cursor workflow (skill + memory-updater subagent), a new read-only
agents-md-auditinspection agent for AGENTS.md Learned sections, shell/Makefile shortcuts to run repo agents, and documentation fixes for the automation stack.Changes
.cursor/agents/agents-memory-updater.mdand.cursor/skills/continual-learning/SKILL.mdfor transcript mining and AGENTS.md memory updatesscripts/agents/agents_md_audit_agent.py(agents-md-audit) — validates Learned section structure, bullet limits, secret patterns, and stale datesscripts/run_repo_agents.pyscripts/run_ai_automation.shand Makefile targets (make agents,make agents-dry,make ai-automation)--run-agentsstep order to match code)~/.cursor/projects/workspace/canvases/automation-status.canvas.tsx(IDE-local artifact)Verification
pytest tests/test_agents_md_audit_agent.py -v— 9 passed./scripts/run_ai_automation.sh --agent agents-md-audit --dry-run— okmake agents-dry— 4 agents run (2 ok, 2 warning from pre-existing marker/docstring findings)/continual-learningin chat to delegate toagents-memory-updaterSummary by Sourcery
Introduce a new automation agent for auditing AGENTS.md and wire it into the repo automation workflow, alongside continual-learning support and new entry points for running agents.
New Features:
Enhancements:
Tests: